Encoding and syndrome computing co-design circuit for bch code and method for deciding the same

ABSTRACT

An encoding and syndrome computing co-design circuit for BCH code and a method for deciding the circuit are disclosed. The method includes the steps of: building up matrices of X R , X G  and X S  according to p parallel computations and 2t syndromes; building up F P ; building up F′; building up F″; building up matrix of [X SRG  F″]; and designing a circuit which fulfills the operation of [X SRG  F″].

FIELD OF THE INVENTION

The present invention relates to a co-design circuit and a method fordeciding the circuit. More particularly, the present invention relatesto a co-design circuit for BCH code encoding and syndrome computing anda method for deciding the circuit.

BACKGROUND OF THE INVENTION

Bose-Chaudhuri-Hocquenghem (BCH) code is one of the most widely usederror correction code (ECC) techniques in the storage and communicationdevices. BCH code can detect and correct random errors occurred due tochannel noises and defects within memory devices. The encodingprocedures of BCH codeword can be implemented by linear feedback shiftregister (LFSR) and some combination logics together. Comparing withencoding procedures of the BCH codewords, decoding procedures of the BCHcodewords are much complicated as shown in FIG. 1. Decoding proceduresare as below: After receiving a codeword (S01), in order to decode it,one should compute a syndrome according to specified polynomials (S02).Then, depending on the syndrome, an error-location polynomial can befound (S03). Next, by calculating the roots of the error-locationpolynomial, error-location numbers can be obtained (S04). Finally, anerroneous codeword can be corrected by above steps (S05).

A conventional linear feedback shift register circuit is shown in FIG.2. In order to speed up operation, the circuit is often designed to beparallelization. It can calculate several inputted bit datum at the sametime. The alphabet p in FIG. 2 represents the p-bit datum of theinputted R′(j) in the j^(th) clock for synchronized calculation. Afterencoding, the results of Z(j) are outputted. If the code length is nbits, the procedures of encoding will complete after [n/p] clocks.

In a BCH decoder, there are some similar architectures of iterativecalculation. For example, the syndrome computing unit. For a syndromecomputing unit having error correcting ability t, each syndrome S_(i)can be found by the equation below:

${S_{i} = {{r\left( \alpha^{i + 1} \right)} = {\sum\limits_{j = 0}^{n - 1}{r_{j}\left( \alpha^{i + 1} \right)}^{j}}}},\left( {i = {1\mspace{14mu} \ldots \mspace{14mu} t}} \right)$

r(αi+1) represents a received codeword polynomial. In order to implementthe equation above, a commonly seen decoding circuit will include thesyndrome computing unit for corresponding processes. A conventionalsyndrome computing unit is shown in FIG. 3. Similar to theaforementioned encoder, in FIG. 3, Numeral p is the number of bitsreceived in one clock (p parallel computations). g_(i)(j) is anintermediate data of the j^(th) iterative operation.

The above equation can be presented in form of a matrix. Hence, commonsub-expressions can be found during derivation processes. For implementof circuitry, by sharing proper hardware, the common sub-expressions canbe saved. Meanwhile, the target of lowering hardware complexity can beachieved. In addition, since the encoder of the BCH code runs by usingsimilar iterative operation, if encoding and decoding are not requiredto process at the same time, the encoder and syndrome computing unit canshare the same registers. It further saves area cost. Many prior artsdisclose such design, for example, U.S. Pat. No. 6,405,339, U.S. Pat.No. 7,743,311, U.S. Pat. No. 8,418,021, etc. However, the hardwarecomplexities provided by those patents are still too high. For compactdesigned electronic devices, there is still room for improvement.

SUMMARY OF THE INVENTION

As mentioned above, among the solutions of co-design circuits for BCHencoding and syndrome computing, hardware complexity is higher and areacost is large. Therefore, a proper co-design circuit to lower hardwarecomplexity is desperately desired. It is better for the circuit toefficiently reduce common sub-expressions in BCH encoding and syndromecomputing.

According to an aspect of the present invention, a co-design circuit forBCH encoding and syndrome computing, capable of processing p parallelcomputation includes: an encoding unit, for encoding one message havingk bits as one BCH codeword having n bits after processing a firstiterative operation, the first iterative operation being processed toreceive p bits sequentially in each clock and output the BCH codewordafter [n/p] clocks; a syndrome computing unit, for obtaining 2tsyndromes each having m bits from one BCH codeword having n bits afterprocessing a second iterative operation, the second iterative operationbeing processed to receive p bits sequentially in each clock and outputthe syndromes after [n/p] clocks; a number of multiplexers, each beingused to receive a first intermediate computing result generated from thefirst iterative operation and a second intermediate computing resultgenerated from the second iterative operation, wherein when the firstiterative operation processes, the first intermediate computing resultis outputted, and when the second iterative operation processes, thesecond intermediate computing result is outputted; and a number ofregisters, each being used to receive the first intermediate computingresult or the second intermediate computing result from a correspondingmultiplexer, or the second intermediate computing result from a syndromecomputing unit, and outputting the first intermediate computing resultto the encoding unit or the second intermediate computing result to thesyndrome computing unit in a later clock after the first intermediatecomputing result or the second intermediate computing result isreceived. Numeral k, n, p and t are positive integers and n is greaterthan k. Numeral m is the power of 2 over GF(2^(m)).

Preferably, the first iterative operation is processed to obtaincomputed values of Z(j) and a complete BCH codeword. Z(j) is expressedas below: Z(j)=F^(p)×[Z(j−1)+R′(j)], where all elements in Z(0) are 0,

${{R^{\prime}(j)} = \begin{bmatrix}{r_{0}^{\prime}(j)} & {r_{1}^{\prime}(j)} & {r_{2}^{\prime}(j)} & \ldots & {r_{p - 1}^{\prime}(j)} & 0 & \ldots & 0\end{bmatrix}_{1 \times R}^{T}},{F^{p} = \left\lbrack {F^{p - 1} \times \begin{bmatrix}g_{R - 1}^{\prime} \\g_{R - 2}^{\prime} \\\vdots \\g_{1}^{\prime} \\g_{0}^{\prime}\end{bmatrix}} \middle| {{{first}\mspace{14mu} R} - {1\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p - 1}}} \right\rbrack},{{F^{1} = \begin{bmatrix}g_{R - 1}^{\prime} & 1 & 0 & \ldots & 0 \\g_{R - 2}^{\prime} & 0 & 1 & \ldots & 0 \\\vdots & \vdots & \vdots & \vdots & \vdots \\g_{1}^{\prime} & 0 & 0 & \ldots & 1 \\g_{0}^{\prime} & 0 & 0 & \ldots & 0\end{bmatrix}};}$

Z(j) is the first intermediate computing results from a j^(th) iterativecalculation of the first iterative operation; for a n-bit initialprocessing data including the k-bit message and being divided per pbits, R′(j) is the j^(th) p bits. R=n−k+1; g′_(R-1), g′_(R-2), . . . andg′₀ are coefficients of a generating polynomial,g(x)=x^(R)+g′_(R-1)x^(R-1)+g′_(R-2)x^(R-2)+ . . . +g′₂x²+g′₁x¹+g′₀.

Preferably, the first iterative operation satisfies operation of amatrix F″, where

${F^{''} = \begin{bmatrix}F^{\prime \; T} \\0\end{bmatrix}_{{({P + {mt}})} \times {Rt}}},{{F^{\prime} = \left\lbrack {{first}\mspace{14mu} p\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p}} \middle| F^{p} \right\rbrack};}$

m is a positive integer.

Preferably, the second iterative operation is processed to obtaincomputed values of G(j) and complete syndromes, wherein

${\left\lbrack {{S(j)}{G(j)}} \right\rbrack = {{\left\lbrack {{R(j)}{G\left( {j - 1} \right)}} \right\rbrack \times \begin{bmatrix}0 & X_{R} \\X_{S} & X_{G}\end{bmatrix}} = {\left\lbrack {{R(j)}{G\left( {j - 1} \right)}} \right\rbrack \times X_{SRG}}}},$

where G(j)=[g₁ (j) g₃ (j) . . . g_(2t-1) (j)]; G(j) represents m×tsecond intermediate computing results from a j^(th) iterativecalculation of the second iterative operation, R(j)=[r₀(j) r₁(j) . . .r_(p-1)(j)], R(j) represents p bits of the codeword received by thesyndrome computing unit in the j^(th) iterative calculation; S(j)represents outputted computed values of syndromes in the j^(th)iterative calculation; X_(R) is a p×mt binary matrix; X is a mt×mtbinary matrix; X_(S) is a mt×2mt binary matrix.

Preferably, the X_(R), X_(G) and X_(G) are defined as:

X_(R)=[C₁ C₃ . . . C_(2t-1)], where

${C_{{2t} - 1} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \ldots & \alpha_{m - 1}^{0} \\\alpha_{0}^{{2t} - 1} & \alpha_{1}^{{2t} - 1} & \ldots & \alpha_{m - 1}^{{2t} - 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({p - 1})}{({{2t} - 1})}} & \alpha_{1}^{{({p - 1})}{({{2t} - 1})}} & \ldots & \alpha_{m - 1}^{{({p - 1})}{({{2t} - 1})}}\end{bmatrix}},$

${X_{G} = \begin{bmatrix}A_{1p} & 0 & \ldots & 0 \\0 & A_{3p} & \ldots & 0 \\\vdots & \vdots & {\ddots \; A_{{({{2t} - 3})}p}} & \vdots \\0 & 0 & \ldots & A_{{({{2t} - 1})}p}\end{bmatrix}},{A_{{({{2t} - 1})}p} = \begin{bmatrix}\alpha_{0}^{{({{2t} - 1})}p} & \alpha_{1}^{{({{2t} - 1})}p} & \ldots & \alpha_{m - 1}^{{({{2t} - 1})}p} \\\alpha_{0}^{{{({{2t} - 1})}p} + 1} & \alpha_{1}^{{{({{2t} - 1})}p} + 1} & \ldots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{{({{2t} - 1})}p} + m - 1} & \alpha_{1}^{{{({{2t} - 1})}p} + m - 1} & \ldots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + m - 1}\end{bmatrix}},{X_{s} = \begin{bmatrix}I & B_{2} & 0 & B_{4} & 0 & 0 & \ldots \\0 & 0 & I & 0 & 0 & B_{2} & \ldots \\0 & 0 & 0 & 0 & I & 0 & \ldots \\\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\end{bmatrix}},{and}$ ${B_{w} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \ldots & \alpha_{m - 1}^{0} \\\alpha_{0}^{w} & \alpha_{1}^{w} & \ldots & \alpha_{m - 1}^{w} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({m - 1})}w} & \alpha_{1}^{{({m - 1})}w} & \ldots & \alpha_{m - 1}^{{({m - 1})}w}\end{bmatrix}},$

wherein α₀ . . . and α_((m-1)) are elements in GF(2^(m)); I is a unitmatrix, B_(w) is an operating matrix other than a zero matrix and a unitmatrix; w is an positive integer of power of 2 and smaller than or equalto 2t.

Preferably, the amount of multiplexers is greater than R value of theBCH code which can be encoded by the encoding unit, where R=n−k+1. Theamount of the registers is greater than or equal to m×t. The firstintermediate computing result is a one bit signal and the secondintermediate computing result is a one bit signal.

According to another aspect of the present invention, a method fordeciding a co-design circuit for BCH encoding and syndrome computingincludes the steps of: building up X_(R), X_(G) and X_(S) according to pparallel computations and 2t syndromes; building up F^(P); building upF′; building up F″; building up matrix [X_(SRG) F″]; and designing acircuit fulfilling operation of matrix [X_(SRG) F″], wherein k, n, p andt are positive integers, n is greater than k, X_(R)=[C₁ C₃ . . .C_(2t-1)], where

${C_{{2t} - 1} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \ldots & \alpha_{m - 1}^{0} \\\alpha_{0}^{{2t} - 1} & \alpha_{1}^{{2t} - 1} & \ldots & \alpha_{m - 1}^{{2t} - 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({p - 1})}{({{2t} - 1})}} & \alpha_{1}^{{({p - 1})}{({{2t} - 1})}} & \ldots & \alpha_{m - 1}^{{({p - 1})}{({{2t} - 1})}}\end{bmatrix}},\alpha_{0},{\ldots \mspace{14mu} {and}\mspace{14mu} \alpha_{({m - 1})}\mspace{14mu} {are}}$

elements in GF(2^(m));

${X_{G} = \begin{bmatrix}A_{1p} & 0 & \ldots & 0 \\0 & A_{3p} & \ldots & 0 \\\vdots & \vdots & {\ddots \; A_{{({{2t} - 3})}p}} & \vdots \\0 & 0 & \ldots & A_{{({{2t} - 1})}p}\end{bmatrix}},{where}$ ${A_{{({{2t} - 1})}p} = \begin{bmatrix}\alpha_{0}^{{({{2t} - 1})}p} & \alpha_{1}^{{({{2t} - 1})}p} & \ldots & \alpha_{m - 1}^{{({{2t} - 1})}p} \\\alpha_{0}^{{{({{2t} - 1})}p} + 1} & \alpha_{1}^{{{({{2t} - 1})}p} + 1} & \ldots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{{({{2t} - 1})}p} + m - 1} & \alpha_{1}^{{{({{2t} - 1})}p} + m - 1} & \ldots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + m - 1}\end{bmatrix}};$ ${X_{s} = \begin{bmatrix}I & B_{2} & 0 & B_{4} & 0 & 0 & \ldots \\0 & 0 & I & 0 & 0 & B_{2} & \ldots \\0 & 0 & 0 & 0 & I & 0 & \ldots \\\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\end{bmatrix}},{where}$ ${B_{w} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \ldots & \alpha_{m - 1}^{0} \\\alpha_{0}^{w} & \alpha_{1}^{w} & \ldots & \alpha_{m - 1}^{w} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({m - 1})}w} & \alpha_{1}^{{({m - 1})}w} & \ldots & \alpha_{m - 1}^{{({m - 1})}w}\end{bmatrix}},$

where I is a unit matrix, B_(w) is an operating matrix other than a zeromatrix and a unit matrix, w is an positive integer of power of 2 andsmaller than or equal to 2t;

${X_{SRG} = \begin{bmatrix}0 & X_{R} \\X_{S} & X_{G}\end{bmatrix}},$

${F^{''} = \begin{bmatrix}F^{\prime \; T} \\0\end{bmatrix}_{{({P + {mt}})} \times {Rt}}},{F^{\prime} = \left\lbrack {{first}\mspace{14mu} p\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p}} \middle| F^{p} \right\rbrack},{F^{p} = \left\lbrack {F^{p - 1} \times \begin{bmatrix}g_{R - 1}^{\prime} \\g_{R - 2}^{\prime} \\\vdots \\g_{1}^{\prime} \\g_{0}^{\prime}\end{bmatrix}} \middle| {{{first}\mspace{14mu} R} - {1\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p - 1}}} \right\rbrack},{F^{1} = \begin{bmatrix}g_{R - 1}^{\prime} & 1 & 0 & \ldots & 0 \\g_{R - 2}^{\prime} & 0 & 1 & \ldots & 0 \\\vdots & \vdots & \vdots & \vdots & \vdots \\g_{1}^{\prime} & 0 & 0 & \ldots & 1 \\g_{0}^{\prime} & 0 & 0 & \ldots & 0\end{bmatrix}},$

where R=n−k+1; g′_(R-1), g′_(R-2) . . . and g′₀ are coefficients of agenerating polynomial,

g(x)=x ^(R) +g′ _(R-1) x ^(R-1) +g′ _(R-2) x ^(R-2) + . . . +g′ ₂ x ²+g′ ₁ x ¹ +g′ ₀.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is conventional decoding processes for BCH code.

FIG. 2 shows a prior art circuit design of a linear feedback shiftregister.

FIG. 3 shows a convention a syndrome computing unit.

FIG. 4 shows a co-design circuit for BCH encoding and syndrome computingaccording to the present invention.

FIG. 5 depicts operation of the co-design circuit for encoding.

FIG. 6 depicts operation of the co-design circuit for syndromecomputing.

FIG. 7 illustrates a method for deciding the co-design circuit.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The present invention will now be described more specifically withreference to the following embodiment.

First, a further illustration about BCH encoding is provided below. Foran encoded BCH codeword having n bits, it includes a k-bit message.During encoding processes, a generating polynomial below is applied:

g(x)=x ^(R) +g′ _(R-1) x ^(R-1) +g′ _(R-2) x ^(R-2) + . . . +g′ ₂ x ²+g′ ₁ x ¹ +g′ ₀,

where R=n−k+1. When an encoder capable of processing encoding of pparallel computations synchronously is used, for a n-bit initialprocessing data including the k-bit message and being divided per p bitsas R′(1), R′(2), . . . R′(n/p)(R′(n/p) is not necessary p bits),inputted to the encoder per clock sequentially for operation. In view ofa general formula, in a j^(th) clock (1≦j≦n/p), the outputted computedvalues are as: Z(j)=F^(p)×[Z(j−1)+R′(j)]. It should be noticed that allelements in Z(0) are 0. In order to facilitate operation, it is denotedthat

R′(j)=[r′ ₀(j) r′ ₁(j) r′ ₂(j) . . . r′ _(p-1)(j)|0 . . . 0]_(1×R) ^(T).

R′(j) is the j^(th) p bits. Z(j) has R bits denoting by Z₀(j), Z₁(j), .. . Z_(R-1)(j), respectively. Other expressions in the above formula arefurther described as below:

$F^{p} = \left\lbrack {F^{p - 1} \times \begin{bmatrix}g_{R - 1}^{\prime} \\g_{R - 2}^{\prime} \\\vdots \\g_{1}^{\prime} \\g_{0}^{\prime}\end{bmatrix}} \middle| {{{first}\mspace{14mu} R} - {1\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p - 1}}} \right\rbrack$$F^{1} = \begin{bmatrix}g_{R - 1}^{\prime} & 1 & 0 & \ldots & 0 \\g_{R - 2}^{\prime} & 0 & 1 & \ldots & 0 \\\vdots & \vdots & \vdots & \vdots & \vdots \\g_{1}^{\prime} & 0 & 0 & \ldots & 1 \\g_{0}^{\prime} & 0 & 0 & \ldots & 0\end{bmatrix}$

Let F′=[first p columns of F^(p)|F^(p)], transpose of Z(j) can beobtained.

$\begin{matrix}{{Z(j)}^{T} = \left\{ {F^{p} \times \left\lbrack {{Z\left( {j - 1} \right)} + {R^{\prime}(j)}} \right\rbrack} \right\}^{T}} \\{= {\left\lbrack {{Z\left( {j - 1} \right)} + {R^{\prime}(j)}} \right\rbrack^{T} \times F^{p^{T}}}} \\{= {\left\lbrack {{R^{\prime}(j)}{Z\left( {j - 1} \right)}} \right\rbrack \times F^{t^{T}}}}\end{matrix}$

A circuit fulfills this operation can also achieve the encodingoperation shown in FIG. 2.

Come back to syndrome computing. Yungjoo Lee et al. disclosed a paper onIEEE International Journal in 2012, titled “mall-area parallel syndromecalculation for strong BCH decoding” where a method for syndromecomputing unit, capable of searching for common sub-expressions wasdiscussed. According to the paper, a syndrome computing unit with psyndrome parallel computations needs [n/p] clocks to finish syndromecomputing. It is also includes 2t sub-units for generating 2t syndromessynchronously. In the j^(th) clock, the syndrome S(j) computed from thesyndrome computing unit can be expressed as:

$\left\lbrack {{S(j)}{G(j)}} \right\rbrack = {{\left\lbrack {{R(j)}{G\left( {j - 1} \right)}} \right\rbrack \times \begin{bmatrix}0 & X_{R} \\X_{S} & X_{G}\end{bmatrix}} = {\left\lbrack {{R(j)}{G\left( {j - 1} \right)}} \right\rbrack \times X_{SRG}}}$

In the above formula, S(j) is a 1×2mt binary matrix, representing 2tcomputed values of syndromes in the j^(th) iterative calculation. Eachcomputed value of the syndrome has m bits. Numeral m is a non-zeropositive integer and is the power of 2 over GF(2^(m)). G(j) is a 1×mtbinary matrix, representing m×t temporary intermediate computing resultsin the j^(th) iterative calculation. G(j) can be expressed as below:

G(j)=[g ₁(j) g ₃(j) . . . g _(2t-1)(j)]

where g₁(j), g₃(j), . . . g_(2t-1)(j) are temporary results from one odditerative calculation. Each of them is a 1×mbinary matrix and includes mbits.

R(j) is a 1×p binary matrix, representing received p bits (r₀(j), r₁(j). . . r_(p-1)(j)) of a codeword by the syndrome computing unit in thej^(th) iterative calculation. It is expressed by a matrix,

R(j)=[r ₀(j) r ₁(j) . . . r _(p-1)(j)].

X_(R) is a p×mt binary matrix about the inputted codeword. It isexpressed as X_(R)=[C₁ C₃ . . . C_(2t-1)]. C_(2t-1) can be expressed as:

$C_{{2\; t} - 1} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \cdots & \alpha_{m - 1}^{0} \\\alpha_{0}^{{2t} - 1} & \alpha_{1}^{{2t} - 1} & \cdots & \alpha_{m - 1}^{{2t} - 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({p - 1})}{({{2t} - 1})}} & \alpha_{1}^{{({p - 1})}{({{2t} - 1})}} & \cdots & \alpha_{m - 1}^{{({p - 1})}{({{2t} - 1})}}\end{bmatrix}$

α⁰ . . . and α^((m-1)) are elements in GF(2^(m)).

X_(G) is a mt×mt binary matrix, representing fixed multiplications inthe method. X_(G) is shown as below.

$X_{G} = \begin{bmatrix}A_{1_{p}} & 0 & \cdots & 0 \\0 & A_{3_{p}} & \cdots & 0 \\\vdots & \vdots & {\ddots \mspace{11mu} A_{{({{2t} - 3})}p}} & \vdots \\0 & 0 & \cdots & A_{{({{2t} - 1})}p}\end{bmatrix}$

A_((2t-1)p) can be expressed as

$A_{{({{2t} - 1})}p} = \begin{bmatrix}\alpha_{0}^{{({{2t} - 1})}p} & \alpha_{1}^{{({{2t} - 1})}p} & \cdots & \alpha_{m - 1}^{{({{2t} - 1})}p} \\\alpha_{0}^{{{({{2t} - 1})}p} + 1} & \alpha_{1}^{{{({{2t} - 1})}p} + 1} & \cdots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{{({{2t} - 1})}p} + m - 1} & \alpha_{1}^{{{({{2t} - 1})}p} + m - 1} & \cdots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + m - 1}\end{bmatrix}$

X_(S) is a mt×2mt binary matrix. It contains many m×m unit matrices andm×m operating matrices. X_(S) is expressed as below:

$X_{s} = \begin{bmatrix}I & B_{2} & 0 & B_{4} & 0 & 0 & \cdots \\0 & 0 & I & 0 & 0 & B_{2} & \cdots \\0 & 0 & 0 & 0 & I & 0 & \cdots \\\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\end{bmatrix}$

I is a unit matrix. B_(w) is a general form of operating matrix B₂, B₄,. . . etc.Numeral w is a positive integer of power of 2 and smaller than or equalto 2t.B_(w) can be expressed as:

$B_{w} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \cdots & \alpha_{m - 1}^{0} \\\alpha_{0}^{w} & \alpha_{1}^{w} & \cdots & \alpha_{m - 1}^{w} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({m - 1})}w} & \alpha_{1}^{{({m - 1})}w} & \cdots & \alpha_{m - 1}^{{({m - 1})}w}\end{bmatrix}$

In the paper that Yungjoo Lee provided, it is obvious that the syndromecomputing unit according to the method has reduced many commonsub-expressions. Now, if the syndrome computing unit can combined with aBCH encoding unit, it is able to reduce area cost of such circuitdesign.

Based on the above inference, let

${F^{''} = {{\begin{bmatrix}F^{\prime \; T} \\0\end{bmatrix}_{{({P + {mt}})} \times {Rt}}.\mspace{11mu} {With}}\mspace{14mu} X_{SRG}}},$

it is obtained that Y=[X_(SRG) F″]_((P+mt)×(3mt+Rt)). By applying acircuit for the matrix Y with proper buffers and switches, a co-designcircuit for BCH encoding and syndrome computing can be achieved.

Therefore, the present invention provides the co-design circuit for BCHencoding and syndrome computing. Please refer to FIG. 4. FIG. 4 depictsan architecture of a co-design circuit 10 for BCH encoding and syndromecomputing. The co-design circuit 10 includes an encoding unit 100, asyndrome computing unit 200, R multiplexers 300 and t×m registers 400.The co-design circuit 10 can process p parallel computationsynchronously. It can be used to encode one message having k bits as aBCH codeword with n bits. It can also be used to process syndromecomputing for one received BCH codeword with n bits. BCH encoding andsyndrome computing will not conflict by using proper switchingcircuitry.

The encoding unit 100 can process to obtain computed values of Z(j) anda complete BCH codeword, Z. Therefore, it satisfies operation of matrixF″. Thus, in the j^(th) clock (j^(th) iterative calculation), p inputs(r′₀(j), r′₁(j), r′₂(j), . . . and r′_((p-1))(j)) of R′(j) are inputtedto the co-design circuit 10 sequentially. By an iterative operation,after [n/p] times of calculations, the complete BCH codeword, Z (Z₀, Z₁,. . . and Z_(R-1)) can be outputted by the co-design circuit 10. Sincethe encoding and syndrome computing share some multiplexers 300 andregisters 400 for respective iterative operations, when receivingsignals, it is necessary to distinguish that the signal is for encodingor syndrome computing. The job function is carried out by themultiplexers 300. Please see FIG. 5. After R′(j) is inputted,intermediate computing results, Z₀(j), Z₁(j), . . . and Z_(R-1)(j) areinputted to different multiplexers 300, respectively. Each multiplexer300 only chooses the signal form the encoding unit 100 (intermediatecomputing results) to output, rather than the one from the syndromecomputing unit 200 (shown by dashed arrow). The signal outputted fromthe multiplexers 300, respectively, is inputted to a correspondingregister 400. Those registers 400 output the signals to the encodingunit 100 for operation in a (j+1)^(th) clock.

When syndrome computing is required, the syndrome computing unit 200operates. The syndrome computing unit 200 can process to obtain computedvalues of G(j) and a complete syndrome, S. Therefore, it satisfiesoperation of matrix X_(SRG). Thus, in the jth clock (jth iterativecalculation), p inputs (r₀(j), r₁(j), r₂(j), . . . and r_((p-1))(j)) ofR(j) are inputted to the co-design circuit 10 sequentially. By aniterative operation, after [n/p] times of calculations, the completesyndrome S (S¹(1), S¹(2), . . . , S¹(2), . . . S^(2t)(m)) can beoutputted from the co-design circuit 10. Numbers or letters in subscriptbrackets of S represent one bit of a corresponding syndrome. Forexample, S_(2t)(m) is the m^(th) bit of the syndrome S_(2t). Since theencoding and syndrome computing share some multiplexers 300 andregisters 400 for respective iterative operations, when receivingsignals, it is necessary to distinguish that the signal is for encodingor syndrome computing. The job function is also carried out by themultiplexers 300. Please see FIG. 6. After R(j) is inputted,intermediate computing results, g₁₍₁₎(j), g₁₍₂₎(j), . . . andg_(2t-1(m))(j) are inputted to different multiplexers 300, respectively.Each multiplexer 300 only chooses the signal form the syndrome computingunit 200 (intermediate computing results) to output, rather than the onefrom the encoding unit 100 (shown by dashed arrow). The signal outputtedfrom the multiplexers 300, respectively, is inputted to a correspondingregister 400. Those registers 400 output the signals to the syndromecomputing unit 200 for operation in a (j+1)^(th) clock. Since there arem×t bits outputted at the same time and the amount is greater than R,some of the outputted values can bypass the multiplexers 300 and aredirectly inputted to the registers 400. Hence, the amount of theregisters 400 should be at least m×t.

Please refer to FIG. 4 again. There are several points to note. First,the present invention can be applied on different BCH encodings. Namely,the code length n and number of bits of the message (k bits) can bechanged. R varies accordingly. Meanwhile, because the number ofmultiplexers 300 relates to R, when it is to design the multiplexers300, the amount of the multiplexers 300 should be greater than R valueof the BCH code which can be encoded by the encoding unit. The number ofthe multiplexers 300 shown in FIG. 4 to FIG. 6 is only R. In practice,it is not limited to R. Besides, the amount of bits of the syndrome,2tm, doesn't correspond to code length n. FIG. 4 that shows that 2tm isgreater than n is only exemplary. 2tm may be smaller than n. Finally,FIG. 4 shows that Z_(R-1)(j) and g₃₍₂₎(j) share the same multiplexer300. It is inferred that R=m+2. However, it is one of the many designsand not unchangeable. Difference between R and m can be any number.

According to the introduction of the co-design circuit for BCH encodingand syndrome computing, a method for deciding the co-design circuit canbe available as below: First, build up X_(R), X_(G) and X_(S) accordingto p parallel computations and 2t syndromes (S11). Then, build up F^(P)(S12), F′(S13) and F″ (S14) sequentially. According to the builtmatrices, build up matrix [X_(SRG) F″](S15). Finally, design a circuitfulfilling operation of matrix [X_(SRG) F″](S16).

While the invention has been described in terms of what is presentlyconsidered to be the most practical and preferred embodiment, it is tobe understood that the invention needs not be limited to the disclosedembodiment. On the contrary, it is intended to cover variousmodifications and similar arrangements included within the spirit andscope of the appended claims, which are to be accorded with the broadestinterpretation so as to encompass all such modifications and similarstructures.

What is claimed is:
 1. A co-design circuit for BCH encoding and syndromecomputing, capable of processing p parallel computation, comprising: anencoding unit, for encoding one message having k bits as one BCHcodeword having n bits after processing a first iterative operation, thefirst iterative operation being processed to receive p bits sequentiallyin each clock and output the BCH codeword after [n/p] clocks; a syndromecomputing unit, for obtaining 2t syndromes each having m bits from oneBCH codeword having n bits after processing a second iterativeoperation, the second iterative operation being processed to receive pbits sequentially in each clock and output the syndromes after [n/p]clocks; a plurality of multiplexers, each being used to receive a firstintermediate computing result generated from the first iterativeoperation and a second intermediate computing result generated from thesecond iterative operation, wherein when the first iterative operationprocesses, the first intermediate computing result is outputted, andwhen the second iterative operation processes, the second intermediatecomputing result is outputted; and a plurality of registers, each beingused to receive the first intermediate computing result or the secondintermediate computing result from a corresponding multiplexer, or thesecond intermediate computing result from a syndrome computing unit, andoutputting the first intermediate computing result to the encoding unitor the second intermediate computing result to the syndrome computingunit in a later clock after the first intermediate computing result orthe second intermediate computing result is received, wherein k, n, pand t are positive integers, n is greater than k and m is the power of 2over GF(2^(m)).
 2. The co-design circuit according to claim 1, whereinthe first iterative operation is processed to obtain computed values ofZ(j) and a complete BCH codeword, wherein Z(j)=F^(p)×[Z(j−1)+R′(j)] andall elements in Z(0) are 0, where ${{R^{\prime}(j)} = \begin{bmatrix}\begin{matrix}{r_{0}^{\prime}(j)} & {r_{1}^{\prime}(j)} & {r_{2}^{\prime}(j)} & \cdots & {r_{p - 1}^{\prime}(j)}\end{matrix} & | & 0 & \cdots & 0\end{bmatrix}_{1{xR}}^{T}},{F^{p} = \left\lbrack {{F^{p - 1} \times \begin{bmatrix}g_{R - 1}^{\prime} \\g_{R - 2}^{\prime} \\\vdots \\g_{1}^{\prime} \\g_{0}^{\prime}\end{bmatrix}}\mspace{14mu} {{{first}\mspace{14mu} R} - {1\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p - 1}}}} \right\rbrack},{F^{1} = \begin{bmatrix}g_{R - 1}^{\prime} & 1 & 0 & \cdots & 0 \\g_{R - 2}^{\prime} & 0 & 1 & \cdots & 0 \\\vdots & \vdots & \vdots & \vdots & \vdots \\g_{1}^{\prime} & 0 & 0 & \cdots & 1 \\g_{0}^{\prime} & 0 & 0 & \cdots & 0\end{bmatrix}},$ Z(j) is the first intermediate computing results from aj^(th) iterative calculation of the first iterative operation; for an-bit initial processing data including the k-bit message and beingdivided per p bits, R′(j) is the j^(th) p bits; R=n−k+1; g′_(R-1),g′_(R-2), . . . and g′₀ are coefficients of a generating polynomial,g(x)=x ^(R) +g′ _(R-1) x ^(R-1) +g′ _(R-2) X ^(R-2) + . . . +g′ ₂ x ²+g′ ₁ x ¹ +g′ ₀.
 3. The co-design circuit according to claim 2, whereinthe first iterative operation satisfies operation of a matrix F″,wherein ${F^{''} = \begin{bmatrix}F^{\prime \; T} \\0\end{bmatrix}_{{({P + {mt}})} \times {Rt}}},{{F^{\prime} = \left\lbrack {{first}\mspace{14mu} p\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p}} \middle| F^{p} \right\rbrack};}$m is a positive integer.
 4. The co-design circuit according to claim 1,wherein the second iterative operation is processed to obtain computedvalues of G(j) and complete syndromes, wherein${\left\lbrack {{S(j)}{G(j)}} \right\rbrack = {{\left\lbrack {{R(j)}{G\left( {j - 1} \right)}} \right\rbrack \times \begin{bmatrix}0 & X_{R} \\X_{S} & X_{G}\end{bmatrix}} = {\left\lbrack {{R(j)}{G\left( {j - 1} \right)}} \right\rbrack \times X_{SRG}}}},$where G(j)=[g₁(j) g₃(j) . . . g_(2t-1)(j)], G(j) represents m×t secondintermediate computing results from a j^(th) iterative calculation ofthe second iterative operation, R(j)=[r₀(j) r₁(j) . . . r_(p-1)(j)],R(j) represents p bits of the codeword received by the syndromecomputing unit in the j^(th) iterative calculation, S(j) representsoutputted computed values of syndromes in the j^(th) iterativecalculation; X_(R) is a p×mt binary matrix; X_(G) is a mt×mt binarymatrix; X_(S) is a mt×2mt binary matrix.
 5. The co-design circuitaccording to claim 4, wherein the X_(R), X_(G) and X_(G) are defined as:${X_{R} = \begin{bmatrix}C_{1} & C_{3} & \cdots & C_{{2t} - 1}\end{bmatrix}},{where}$ ${C_{{2t} - 1} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \cdots & \alpha_{m - 1}^{0} \\\alpha_{0}^{{2t} - 1} & \alpha_{1}^{{2t} - 1} & \cdots & \alpha_{m - 1}^{{2t} - 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({p - 1})}{({{2t} - 1})}} & \alpha_{1}^{{({p - 1})}{({{2t} - 1})}} & \cdots & \alpha_{m - 1}^{{({p - 1})}{({{2t} - 1})}}\end{bmatrix}},{X_{G} = \begin{bmatrix}A_{1_{p}} & 0 & \cdots & 0 \\0 & A_{3_{p}} & \cdots & 0 \\\vdots & \vdots & {\ddots \mspace{11mu} A_{{({{2t} - 3})}p}} & \vdots \\0 & 0 & \cdots & A_{{({{2t} - 1})}p}\end{bmatrix}},{A_{{({{2t} - 1})}p} = \begin{bmatrix}\alpha_{0}^{{({{2t} - 1})}p} & \alpha_{1}^{{({{2t} - 1})}p} & \cdots & \alpha_{m - 1}^{{({{2t} - 1})}p} \\\alpha_{0}^{{{({{2t} - 1})}p} + 1} & \alpha_{1}^{{{({{2t} - 1})}p} + 1} & \cdots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{{({{2t} - 1})}p} + m - 1} & \alpha_{1}^{{{({{2t} - 1})}p} + m - 1} & \cdots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + m - 1}\end{bmatrix}},{X_{s} = \begin{bmatrix}I & B_{2} & 0 & B_{4} & 0 & 0 & \cdots \\0 & 0 & I & 0 & 0 & B_{2} & \cdots \\0 & 0 & 0 & 0 & I & 0 & \cdots \\\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\end{bmatrix}},{and}$ ${B_{w} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \cdots & \alpha_{m - 1}^{0} \\\alpha_{0}^{w} & \alpha_{1}^{w} & \cdots & \alpha_{m - 1}^{w} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({m - 1})}w} & \alpha_{1}^{{({m - 1})}w} & \cdots & \alpha_{m - 1}^{{({m - 1})}w}\end{bmatrix}},$ wherein α₀ . . . and α_((m-1)) are elements inGF(2^(m)), I is a unit matrix, B_(w) is an operating matrix other than azero matrix and a unit matrix, w is an positive integer of power of 2and smaller than or equal to 2t.
 6. The co-design circuit according toclaim 1, wherein the amount of multiplexers is greater than R value ofthe BCH code which can be encoded by the encoding unit, where R=n−k+1.7. The co-design circuit according to claim 1, wherein the amount of theregisters is greater than or equal to m×t.
 8. The co-design circuitaccording to claim 1, wherein the first intermediate computing result isa one bit signal and the second intermediate computing result is a onebit signal.
 9. A method for deciding a co-design circuit for BCHencoding and syndrome computing, comprising the steps of: building upX_(R), X_(G) and X_(S) according to p parallel computations and 2tsyndromes; building up F^(P); building up F′; building up F″; buildingup matrix [X_(SRG) F″]; and designing a circuit fulfilling operation ofmatrix [X_(SRG) F″], wherein k, n, p and t are positive integers, n isgreater than k, X_(R)=[C₁ C₃ . . . C_(2t-1)], where${C_{{2t} - 1} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \cdots & \alpha_{m - 1}^{0} \\\alpha_{0}^{{2t} - 1} & \alpha_{1}^{{2t} - 1} & \cdots & \alpha_{m - 1}^{{2t} - 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({p - 1})}{({{2t} - 1})}} & \alpha_{1}^{{({p - 1})}{({{2t} - 1})}} & \cdots & \alpha_{m - 1}^{{({p - 1})}{({{2t} - 1})}}\end{bmatrix}},\alpha_{0},{\ldots \mspace{14mu} {and}\mspace{14mu} \alpha_{({m - 1})}}$are elements in GF(2^(m)); ${X_{G} = \begin{bmatrix}A_{1_{p}} & 0 & \cdots & 0 \\0 & A_{3_{p}} & \cdots & 0 \\\vdots & \vdots & {\ddots \mspace{11mu} A_{{({{2t} - 3})}p}} & \vdots \\0 & 0 & \cdots & A_{{({{2t} - 1})}p}\end{bmatrix}},{where}$ ${A_{{({{2t} - 1})}p} = \begin{bmatrix}\alpha_{0}^{{({{2t} - 1})}p} & \alpha_{1}^{{({{2t} - 1})}p} & \cdots & \alpha_{m - 1}^{{({{2t} - 1})}p} \\\alpha_{0}^{{{({{2t} - 1})}p} + 1} & \alpha_{1}^{{{({{2t} - 1})}p} + 1} & \cdots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + 1} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{{({{2t} - 1})}p} + m - 1} & \alpha_{1}^{{{({{2t} - 1})}p} + m - 1} & \cdots & \alpha_{m - 1}^{{{({{2t} - 1})}p} + m - 1}\end{bmatrix}};$ ${X_{s} = \begin{bmatrix}I & B_{2} & 0 & B_{4} & 0 & 0 & \cdots \\0 & 0 & I & 0 & 0 & B_{2} & \cdots \\0 & 0 & 0 & 0 & I & 0 & \cdots \\\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\end{bmatrix}},{where}$ ${B_{w} = \begin{bmatrix}\alpha_{0}^{0} & \alpha_{1}^{0} & \cdots & \alpha_{m - 1}^{0} \\\alpha_{0}^{w} & \alpha_{1}^{w} & \cdots & \alpha_{m - 1}^{w} \\\vdots & \vdots & \ddots & \vdots \\\alpha_{0}^{{({m - 1})}w} & \alpha_{1}^{{({m - 1})}w} & \cdots & \alpha_{m - 1}^{{({m - 1})}w}\end{bmatrix}},$ where I is a unit matrix, B_(w) is an operating matrixother than a zero matrix and a unit matrix, w is an positive integer ofpower of 2 and smaller than or equal to 2t; ${X_{SRG} = \begin{bmatrix}0 & X_{R} \\X_{S} & X_{G}\end{bmatrix}},{F^{''} = \begin{bmatrix}F^{\prime \; T} \\0\end{bmatrix}_{{({P + {mt}})} \times {Rt}}},{F^{\prime} = \left\lbrack {{first}\mspace{14mu} p\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p}} \middle| F^{p} \right\rbrack}$${F^{p} = \left\lbrack {{F^{p - 1} \times \begin{bmatrix}g_{R - 1}^{\prime} \\g_{R - 2}^{\prime} \\\vdots \\g_{1}^{\prime} \\g_{0}^{\prime}\end{bmatrix}}\mspace{14mu} {{{first}\mspace{14mu} R} - {1\mspace{14mu} {columns}\mspace{14mu} {of}\mspace{14mu} F^{p - 1}}}} \right\rbrack},{F^{1} = \begin{bmatrix}g_{R - 1}^{\prime} & 1 & 0 & \cdots & 0 \\g_{R - 2}^{\prime} & 0 & 1 & \cdots & 0 \\\vdots & \vdots & \vdots & \vdots & \vdots \\g_{1}^{\prime} & 0 & 0 & \cdots & 1 \\g_{0}^{\prime} & 0 & 0 & \cdots & 0\end{bmatrix}},$ where R=n−k+1; g′_(R-1), g′_(R-2) . . . and g′₀ arecoefficients of a generating polynomial,g(x)=x ^(R) +g′ _(R-1) x ^(R-1) +g′ _(R-2) x ^(R-2) + . . . +g′ ₂ x ²+g′ ₁ x ¹ +g′ ₀.